import json2json from './json2json.ts';
import { format } from "https://deno.land/std@0.81.0/datetime/mod.ts";
import { parse } from "https://deno.land/std@0.81.0/flags/mod.ts";
let args = parse(Deno.args);
json2json((input:any)=>{
    if (args.nodate) {console.log(input);return;}
    if ((Array.isArray(input)||typeof(input)!='object')) {
        input = {r:input};
    }
    console.log((typeof(input)=='object')?Object.assign({date:format(new Date(),'yyyy-MM-dd HH:mm:ss')}, input):input)
})
